<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html">
 
    <h:head>
    	<title>
    		<h:outputText value="#{bundle.application_name}" />
    	</title>
    	<link rel="stylesheet" type="text/css" href="css/dochandler-style.css" />
    </h:head>
    
    <h:body>
    	<h3><h:outputText value="#{bundle.application_name}" /> :: Main </h3>
    	
    	<h:form id="main_form">
    	
	    	<p>
	    		Welcome <b> <h:outputLabel value="#{officer.rank}" /> </b> <h:outputLabel value="#{officer.name}" />
	    	</p>
	    	<p>
	    		What would you like to do?
	    	</p>
	    	
    		<h:messages id="error_msg" style="color:red;margin:8px;" />
    		
			<table id="main_table_functions" class="table">
			
				<tr class="table-even-row">
				
					<td style="text-align:right"> <b>Access Document by Id:</b> </td>
					
					<td style="text-align:left">
					
						<h:inputText id="main_input_access-doc" value="#{documentBean.id}" size="2" maxlength="5" />
						
	    				<h:commandButton id="main_btn_access-doc" action="#{documentBean.accessDocument()}" value="Access By Id" />
					</td>
					
				</tr>
				
				<tr class="table-odd-row">
				
					<td style="text-align:right"> <b>List All Documents:</b> </td>
					
					<td style="text-align:left">
						<h:commandButton id="main_btn_list-docs" action="#{documentBean.listDocuments()}" value="List All" />
					</td>
					
				</tr>
				
				<tr class="table-even-row">
				
					<td style="text-align:right"> <b>Create Document:</b> </td>
					
					<td style="text-align:left">
						<h:commandButton id="main_btn_create-doc" action="#{documentBean.createDocument()}" value="Create" />
					</td>
					
				</tr>
				
				<tr class="table-odd-row">
				
					<td style="text-align:right"> <b>Create Attack Document:</b> </td>
					
					<td style="text-align:left">
						<h:commandButton id="main_btn_create-atk-doc" action="#{documentBean.createAttackDocument()}" value="Create" />
					</td>
					
				</tr>
				
	    	</table>
	    	
    	</h:form>
    	
    </h:body>
    
</html>